package com.baor.controller;

import com.baor.domain.OrderLogVo;
import com.baor.domain.OrderVo;
import com.baor.service.DistributionGoodsService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/distribution")
public class DistributionGoodsController {

    @Autowired
    private DistributionGoodsService service;

    @RequestMapping("/goods/list")
    public AjaxResult<?> list(@RequestBody Map<String,Object> map){
        return service.list(map);
    }

    @RequestMapping("/goods/insert")
    public AjaxResult<?> insert(@RequestBody List<Integer> its){
        return service.insert(its);
    }

    @RequestMapping("/goods/delete")
    public AjaxResult<?> delete(@RequestBody List<Integer> its){
        return service.delete(its);
    }

    @RequestMapping("/goods/search")
    public AjaxResult<?> search(@RequestBody Map<String,Object> map){
        return service.search(map);
    }

    @RequestMapping("/disMoney/{logId}")
    public AjaxResult<?> disMoney(@PathVariable Integer logId){//分销返现电泳
        return service.disMoney(logId);
    }

}
